Problems with tag O(n * m * logr)